﻿//using System;
//using System.Collections.Generic;
//using System.Linq;
//using System.Text;

//namespace Pibby.Core.IO.Tests.Stubs
//{
//    public class DriveFactory : IDriveFactory
//    {
//        public IDriveCollection GetAllDrives()
//        {
//            const long megaByte = 1024 * 1024;
//            const long gigaByte = megaByte * 1024;

//            IDriveCollection collection = new IDriveCollection();

//            // fake some drives...
//            collection.Add(new Drive()
//            {
//                DriveType = System.IO.DriveType.Fixed,
//                Name = "C:\\",
//                VolumeLabel = "WINDOWS",
//                AvailableFreeSpace = 100 * megaByte,
//                IsReady = true,
//                TotalSize = 100 * gigaByte
//            });

//            collection.Add(new Drive()
//            {
//                DriveType = System.IO.DriveType.CDRom,
//                Name = "D:\\",
//                VolumeLabel = "CD_ROM",
//                AvailableFreeSpace = 0,
//                IsReady = true,
//                TotalSize = 600 * megaByte
//            });

//            collection.Add(new Drive()
//            {
//                DriveType = System.IO.DriveType.Removable,
//                Name = "E:\\",
//                VolumeLabel = "MEDIA_PLAYER",
//                AvailableFreeSpace = 2 * megaByte,
//                IsReady = true,
//                TotalSize = 4 * gigaByte
//            });

//            return collection;
//        }

//        public IDrive GetDriveByName(string name)
//        {
//            var driveList = this.GetAllDrives();

//            foreach (var drive in driveList)
//            {
//                if (drive.Name == name)
//                    return drive;
//            }

//            return null;
//        }

//        public IDrive GetDriveByLabel(string volumeLabel)
//        {
//            var driveList = this.GetAllDrives();

//            foreach (var drive in driveList)
//            {
//                if (drive.VolumeLabel == volumeLabel)
//                    return drive;
//            }

//            return null;
//        }

//    }

//}
